package c.h.a.w.m;

import android.view.View;
import c.h.a.w.k.e.b;

/* compiled from: RepeatFileFloatingView */
public class h implements Runnable {
    public final /* synthetic */ int a;
    public final /* synthetic */ boolean b;
    public final /* synthetic */ g c;

    public h(g gVar, int i, boolean z) {
        this.c = gVar;
        this.a = i;
        this.b = z;
    }

    public void run() {
        int i = this.a;
        if (i >= 0 && i < this.c.e.size()) {
            int i2;
            g gVar;
            b bVar = (b) this.c.e.get(this.a);
            int i3 = -1;
            boolean z = false;
            if (bVar.e()) {
                i2 = 0;
                while (i2 < bVar.a()) {
                    boolean booleanValue = (bVar.e() && i2 >= 0 && i2 < bVar.b.size() && i2 < bVar.a.size()) ? ((Boolean) bVar.b.get(i2)).booleanValue() : false;
                    g gVar2;
                    if (this.b) {
                        if (!booleanValue) {
                            gVar2 = this.c;
                            gVar2.i++;
                        }
                    } else if (booleanValue) {
                        gVar2 = this.c;
                        gVar2.i--;
                    }
                    i2++;
                }
            }
            bVar.h(this.b);
            if (!bVar.e()) {
                this.c.f.d((this.a - 1) - bVar.e);
                gVar = this.c;
                i2 = gVar.i;
                if (this.b) {
                    i3 = 1;
                }
                gVar.i = i2 + i3;
            } else if (bVar.c.a) {
                g.b bVar2 = this.c.f;
                i3 = this.a;
                bVar2.a.d(i3 + 1, bVar.a() + i3, null);
            }
            gVar = this.c;
            View findViewById = gVar.findViewById(2131296452);
            if (gVar.i != 0) {
                z = true;
            }
            findViewById.setEnabled(z);
            this.c.f.d(this.a);
        }
    }
}
